hdc file send Z:\openharmony\master_https\out\rk3568\tests\fuzztest\huks\huks /data/local/tmp
hdc file send Z:\openharmony\master_https\out\rk3568\exe.unstripped\tests\fuzztest\huks\huks /data/local/tmp

hdc shell chmod +x /data/local/tmp/huks/*

hdc file send Z:\openharmony\master_https\out\rk3568\tests\res /data/local/tmp
hdc shell "find /data/local/tmp -name corpus -exec find {} -type f \;"

# cat run_fuzz.sh
{ time timeout 300 /data/local/tmp/huks/HksUpdateFuzzTest                  /data/local/tmp/res/hksupdate_fuzzer/corpus                 ; } 2> /data/local/tmp/res/hksupdate_fuzzer.result.txt                   &
{ time timeout 300 /data/local/tmp/huks/HksServiceOnRemoteRequestFuzzTest  /data/local/tmp/res/hksserviceonremoterequest_fuzzer/corpus ; } 2> /data/local/tmp/res/hksserviceonremoterequest_fuzzer.result.txt   &
{ time timeout 300 /data/local/tmp/huks/HksKeyExistFuzzTest                /data/local/tmp/res/hkskeyexist_fuzzer/corpus               ; } 2> /data/local/tmp/res/hkskeyexist_fuzzer.result.txt                 &
{ time timeout 300 /data/local/tmp/huks/HksInitFuzzTest                    /data/local/tmp/res/hksinit_fuzzer/corpus                   ; } 2> /data/local/tmp/res/hksinit_fuzzer.result.txt                     &
{ time timeout 300 /data/local/tmp/huks/HksImportWrappedKeyFuzzTest        /data/local/tmp/res/hksimportwrappedkey_fuzzer/corpus       ; } 2> /data/local/tmp/res/hksimportwrappedkey_fuzzer.result.txt         &
{ time timeout 300 /data/local/tmp/huks/HksImportKeyFuzzTest               /data/local/tmp/res/hksimportkey_fuzzer/corpus              ; } 2> /data/local/tmp/res/hksimportkey_fuzzer.result.txt                &
{ time timeout 300 /data/local/tmp/huks/HksHashFuzzTest                    /data/local/tmp/res/hkshash_fuzzer/corpus                   ; } 2> /data/local/tmp/res/hkshash_fuzzer.result.txt                     &
{ time timeout 300 /data/local/tmp/huks/HksGetSdkVersionFuzzTest           /data/local/tmp/res/hksgetsdkversion_fuzzer/corpus          ; } 2> /data/local/tmp/res/hksgetsdkversion_fuzzer.result.txt            &
{ time timeout 300 /data/local/tmp/huks/HksGetKeyParamSetFuzzTest          /data/local/tmp/res/hksgetkeyparamset_fuzzer/corpus         ; } 2> /data/local/tmp/res/hksgetkeyparamset_fuzzer.result.txt           &
{ time timeout 300 /data/local/tmp/huks/HksGetCertificateChainFuzzTest     /data/local/tmp/res/hksgetcertificatechain_fuzzer/corpus    ; } 2> /data/local/tmp/res/hksgetcertificatechain_fuzzer.result.txt      &
{ time timeout 300 /data/local/tmp/huks/HksGenerateKeyFuzzTest             /data/local/tmp/res/hksgeneratekey_fuzzer/corpus            ; } 2> /data/local/tmp/res/hksgeneratekey_fuzzer.result.txt              &
{ time timeout 300 /data/local/tmp/huks/HksFinishFuzzTest                  /data/local/tmp/res/hksfinish_fuzzer/corpus                 ; } 2> /data/local/tmp/res/hksfinish_fuzzer.result.txt                   &
{ time timeout 300 /data/local/tmp/huks/HksExportPublicKeyFuzzTest         /data/local/tmp/res/hksexportpublickey_fuzzer/corpus        ; } 2> /data/local/tmp/res/hksexportpublickey_fuzzer.result.txt          &
{ time timeout 300 /data/local/tmp/huks/HksDeleteKeyFuzzTest               /data/local/tmp/res/hksdeletekey_fuzzer/corpus              ; } 2> /data/local/tmp/res/hksdeletekey_fuzzer.result.txt                &
{ time timeout 300 /data/local/tmp/huks/HksBnExpModFuzzTest                /data/local/tmp/res/hksbnexpmod_fuzzer/corpus               ; } 2> /data/local/tmp/res/hksbnexpmod_fuzzer.result.txt                 &
{ time timeout 300 /data/local/tmp/huks/HksAttestKeyFuzzTest               /data/local/tmp/res/hksattestkey_fuzzer/corpus              ; } 2> /data/local/tmp/res/hksattestkey_fuzzer.result.txt                &
{ time timeout 300 /data/local/tmp/huks/HksAnonAttestKeyFuzzTest           /data/local/tmp/res/hksanonattestkey_fuzzer/corpus          ; } 2> /data/local/tmp/res/hksanonattestkey_fuzzer.result.txt            &
{ time timeout 300 /data/local/tmp/huks/HksAbortFuzzTest                   /data/local/tmp/res/hksabort_fuzzer/corpus                  ; } 2> /data/local/tmp/res/hksabort_fuzzer.result.txt                    &

hdc file recv /data/local/tmp/res/hksupdate_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksserviceonremoterequest_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hkskeyexist_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksinit_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksimportwrappedkey_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksimportkey_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hkshash_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksgetsdkversion_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksgetkeyparamset_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksgetcertificatechain_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksgeneratekey_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksfinish_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksexportpublickey_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksdeletekey_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksbnexpmod_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksattestkey_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksanonattestkey_fuzzer.result.txt
hdc file recv /data/local/tmp/res/hksabort_fuzzer.result.txt

# ps -A | grep -i hks

# ps -A | grep -i hks | wc -l

hdc shell "find /data/local/tmp/res -name '*.result.txt' -print -exec cat {} \;"
